<template>
  <div class="list">
    <div class="title">{{ title }}</div>
    <div v-for="item in list" :key="item.id">
      <van-card :thumb="item.list_pic_url">
        <template #title>
          <p class="goods-title">{{ item.name }}</p>
        </template>
        <template #desc>
          <p class="goods-desc">{{ item.goods_brief }}</p>
        </template>
        <template #price>
          <p class="goods-price">{{ $global.toYuan(item.retail_price) }}</p>
        </template>
      </van-card>
    </div>
  </div>
</template>

<script>
export default {
  name: 'hotGoodsList',
  props: ['list', 'title']
}
</script>

<style scoped lang='less'>
.list {
  background-color: #fff;
  .title {
    width: 100%;
    height: 0.5rem;
    line-height: 0.5rem;
    font-size: 0.2rem;
    text-align: center;
  }
  .goods-title {
    max-height: 0.32rem;
    line-height: 0.29rem;
    font-weight: 500;
    font-size: 0.18rem;
  }
  .goods-desc {
    height: 0.4rem;
    line-height: 0.4rem;
    max-height: 1rem;
  }
  .goods-price {
    height: 0.2rem;
    color: #8d0000;
  }
}
</style>
